<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUserIntegralLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_integral_logs', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->bigInteger("user_id")->index()->comment("用户id");
            $table->integer("integral")->comment("积分变更数量");
            $table->string("des")->comment("积分变更描述");
            $table->string("recoder")->comment("记录这条数据的人")->default("系统");
            $table->string("checker")->comment("审核人")->default("系统");
            $table->boolean("is_checked")->comment("是否审核")->default(false);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_integral_logs');
    }
}
